package com.xiaoshuidi.cloud.module.member.controller.admin.card;

import com.xiaoshuidi.cloud.framework.common.pojo.CommonResult;
import com.xiaoshuidi.cloud.module.member.controller.app.card.vo.MemberUserBankCardVo;
import com.xiaoshuidi.cloud.module.member.enums.ApiConstants;
import com.xiaoshuidi.cloud.module.member.service.card.MemberUserBankCardService;
import com.xiaoshuidi.cloud.module.member.utils.CommonTenantIdVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @description 租客银行卡
 * @author Leo Li
 * @date 2023-05-19 17:20:47
 * @version generator
 */
@Tag(name = "管理后台 - 租客银行卡")
@RestController
@RequestMapping(ApiConstants.NAME+"/bank-card")
public class UserBankCardController {
    @Autowired
    MemberUserBankCardService service;

    @PostMapping("/list-member-bank-card")
    @Operation(summary ="租客银行卡列表")
    public CommonResult<List<MemberUserBankCardVo>> listMemberBankCard(@RequestBody CommonTenantIdVo vo) throws Exception {
        List<MemberUserBankCardVo> list = service.listMemberBankCardById(vo.getTenantUserId());
        return CommonResult.success(list);
    }
}
